    <script type="text/javascript"
      src="http://maps.googleapis.com/maps/api/js?key=<?php echo $options['key']?>&sensor=true">
    </script>
<script type="text/javascript">
  function google_map_location_initialize() {
    var myCenter = new google.maps.LatLng(<?php echo $options['center_x']?>, <?php echo $options['center_y']?>);
    var myOptions = {
      center: myCenter,
      zoom: <?php echo $options['zoom']?>,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("map_canvas"),
      myOptions);
    //begin genarate inforwindow and marker
<?php 
$n  =  count($options['items']);
for($i =0; $i<$n;$i++){
?>
    var myLatlng_<?php echo $i?> = new google.maps.LatLng(<?php echo $options['items'][$i]['x']?>, <?php echo $options['items'][$i]['y']?>);
    var contentString_<?php echo $i?> = $('#gmap_infor_content_<?php echo $i?>').html();
    var marker_<?php echo $i?> = new google.maps.Marker({
      position: myLatlng_<?php echo $i?>,
      map: map,
      title: '<?php echo $options['items'][$i]['title']?>'
    });
    var infowindow_<?php echo $i?> = new google.maps.InfoWindow({
      content: contentString_<?php echo $i?>,
      maxWidth: 300,
	  position: myLatlng_<?php echo $i?>
    });
    google.maps.event.addListener(marker_<?php echo $i?>, 'click', function() {
      infowindow_<?php echo $i?>.open(map,marker_<?php echo $i?>);
    });
    //infowindow_<?php echo $i?>.open(map,marker_<?php echo $i?>);
<?php } ?>
    //end genarate inforwindow and marker
<?php if( !empty($options['id_google_map_location_preview_x']) && !is_null($options['id_google_map_location_preview_x']) &&
          !empty($options['id_google_map_location_preview_y']) && !is_null($options['id_google_map_location_preview_y'])){ ?>	
    var id_google_map_location_add_x = $("#<?php echo $options['id_google_map_location_preview_x']?>");
    var id_google_map_location_add_y = $("#<?php echo $options['id_google_map_location_preview_y']?>");
    google.maps.event.addListener(map, 'mousedown',function(e){
      id_google_map_location_add_x.val(e.latLng.lat());
      id_google_map_location_add_y.val(e.latLng.lng());
    });
<?php } ?>
<?php if( !empty($options['id_google_map_location_preview_zoom']) && !is_null($options['id_google_map_location_preview_zoom'])){ ?>	
    var id_google_map_location_preview_zoom = $("#<?php echo $options['id_google_map_location_preview_zoom']?>");
    google.maps.event.addListener(map, 'zoom_changed', function() {
      id_google_map_location_preview_zoom.val(map.getZoom());
      });
<?php } ?>    
  }
</script>
    <div id="map_canvas" style="width:<?php echo $options['map_width']?>; height:<?php echo $options['map_height']?>"></div>
<?php 
$n  =  count($options['items']);
for($i =0; $i<$n;$i++){
?>
<div id="gmap_infor_content_<?php echo $i?>" style="display:none;" >
<?php echo $options['items'][$i]['content'] ?>
</div>
<?php } ?>